<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<jsp:include page="../admin.jsp"></jsp:include>
<jsp:include page="../../../inc/css.jsp"></jsp:include>
<jsp:include page="../../../inc/js.jsp"></jsp:include>
<LINK href="lib/jquery/jquery.checkboxtree.css" rel="stylesheet"
	type="text/css">
<script type="text/javascript" src="lib/jquery/jquery.checkboxtree.js"></script>
<script type="text/javascript">
$(document).ready(function() {
     $('#tree').checkboxTree({
            collapseAllButton: '合并',
            expandAllButton: '展开',
            collapseImage: 'lib/images/minus.gif',
            expandImage: 'lib/images/plus.gif'//,
            //leafImage: 'lib/images/blank.png'
     });
     $("#update").button().click(function() {
			$("#f").ajaxSubmit(function(data){
					var o = jQuery.parseJSON(data);
					if(o.success){
						alert('操作成功！');
						location.href="?roller_code=${param.roller_code }";
					}
					else
						alert('操作失败！'+o.err);
			});
			return false;
		});
});
</script>
<style type="text/css">
form{
	color: #444444;
}
</style>
</head>
<body>
<form id="f" action="updateMenuTree.do" method="post">
<input type="hidden" id="roller_code" name="roller_code" value="${param.roller_code }">
<button id="update">保存</button>
<ul id="tree">
	${o }
</ul>
</form>
</body>
</html>